#include <gtkmm/main.h>
#include "Tray.h"
#include "NetcfgCppFunctions.h"
#include <string>
#include <stdlib.h>

int main(int argc, char *argv[]) {
	Gtk::Main kit(argc, argv);
	Tray tray;
	while(1) {
		while(Gtk::Main::events_pending()) {
			Gtk::Main::iteration();
		}
		//if(Gtk::Main::events_pending()) Gtk::Main::iteration();
		if(NetcfgCpp::getCurrent() == "") tray.setDisconnected();
		else tray.setConnected();
		tray.setConnection(NetcfgCpp::getCurrent());
		Gtk::Main::iteration();	
		if(!tray.active) break;
		//else Gtk::Main::iteration();
	}
	return 0;
}


